package com.cn.my.newapp

import android.app.Application
import java.io.File

class App : Application() {
    override fun onCreate() {
        super.onCreate()
        file()
    }
    private fun file() {
        for(i in 1..3) {
            val file = File(getExternalFilesDir(null), "skin${i}.apk")
            if (!file.exists()) {
                val open = resources.assets.open("skin${i}.apk")
                val outputStream = file.outputStream()
                open.copyTo(outputStream)
                outputStream.close()
                open.close()
            }
        }
    }

}